package com.prs.crm.service.pm.impl;

import java.io.File;
import java.util.Collection;

import com.prs.crm.context.FileUtil;
import com.prs.crm.dao.pm.PmGroupDao;
import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.pm.PmGroup;
import com.prs.crm.service.impl.BaseServiceImpl;
import com.prs.crm.service.pm.PmGroupService;

public class PmGroupServiceImpl extends BaseServiceImpl<PmGroup,PmGroupDao> implements PmGroupService{

	@Override
	public void submitPmGroup(PmGroup group, File file, String fileName) {
		// TODO Auto-generated method stub
		Attachment attach = FileUtil.getInstance().createAttach(file, fileName);
		group.setAttach(attach);
		this.save(group);
	}

	@Override
	public Collection<PmGroup> getAllPmGroup() {
		// TODO Auto-generated method stub
		return this.getDao().getAllPmGroup();
	}

	@Override
	public Collection<PmGroup> findGroups(Collection<Integer> ids) {
		// TODO Auto-generated method stub
		return this.getDao().findGroups(ids);
	}

}
